﻿using System.Collections.Generic;
using PerceptiveMCAPI.Types;

namespace PerceptiveMCAPI
{
	internal static partial class ValidateInput
	{
		// folderAdd
		internal static List<Api_ValidatorMessage> Validate( folderAddInput input )
		{
			List<Api_ValidatorMessage> messages = ValidateBaseParameters( input as Api_BaseInput );
			Api_ValidatorMessage val;
			// apikey
			val = Validator.apikey_valid( input.parms.apikey );
			if ( val != null ) messages.Add( val );
			// name
			val = Validator.string_value_required( input.parms.name, "name" );
			if ( val != null ) messages.Add( val );
			// type
			val = Validator.folder_type_valid( input.parms.type );
			if ( val != null ) messages.Add( val );
			//--------------------
			return messages;
		}
	}
}
